package com.dao;

import com.pojo.User;
import org.apache.ibatis.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public interface UserDao {

    User selectUserByPassword(User user);

    int updateInfo(User user);

    int updateSno(@Param("sno") String sno,@Param("username") String username);

    User selecrByUsername(User user);



    User findById(User user);

    @Insert("insert into user(username,password,roleId) values(#{user.username},#{user.password},#{roleId})")
    Integer insertData(@Param("user") User user,@Param("roleId") String roleId);


    @Select("select * from user where Sno = #{sno}")
    User findBySno(@Param("sno") String sno);

}
